package zzu.websocket.JAXB;

import javax.xml.bind.annotation.*;
import java.util.List;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "Unit")
//@XmlType(propOrder = {"ID", "Name", "commElement", "list"})
public class Unit {
    @XmlElement(name = "ID")
    private String ID;
    @XmlElement(name = "Name")
    private String Name;
    @XmlElement(name = "CommElement")
    private CommElement commElement;
    @XmlElement(name = "Unit")
    private List<Unit> list;

    @Override
    public String toString() {
        return "Unit{" +
                "ID='" + ID + '\'' +
                ", Name='" + Name + '\'' +
                ", commElement=" + commElement +
                ", list=" + list +
                '}';
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }
//    @XmlTransient
    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }
    @XmlTransient
    public CommElement getCommElement() {
        return commElement;
    }

    public void setCommElement(CommElement commElement) {
        this.commElement = commElement;
    }

    @XmlTransient
    public List<Unit> getList() {
        return list;
    }

    public void setList(List<Unit> list) {
        this.list = list;
    }
}
